<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ page import="performReservation.SMMDBBean"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.Vector"%>
<%!
	Vector<String[]> vec = new Vector<String[]>();
	String per_num = null;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Performance Detail</title>
</head>
<body>
	<%
		per_num = request.getParameter("num");
		if(!per_num.equals("")){
			SMMDBBean pProcess = SMMDBBean.getInstance();
			vec = pProcess.getSpeficPerformDetail(per_num);
			if(vec!=null){
				for(int i = 0 ; i < vec.size(); i++){
					String[] per = new String[7];
					per = vec.get(i);
					%>
					<center>
						<div>
							<p>Performance name :&nbsp;&nbsp;&nbsp;<%=per[2] %></p>
							<p>Performance director :&nbsp;&nbsp;<%=per[1] %></p>
							<p>Performance release date : &nbsp;&nbsp;<%=per[4] %></p>
							<p>Performance language:&nbsp;&nbsp;&nbsp;<%=per[5] %></p>
							<p>Performance category:&nbsp;&nbsp;&nbsp;<%=per[6] %></p>
						</div></center>
						<hr>
						<center>Cinemas has this performance:</center>
						<TABLE border ="3" align="center">
							<TR>
								<TH>Cinema name</TH>
								<TH>Cinema address</TH>
								<TH>Cinema Phone</TH>
								<TH>Cinema info</TH>
								
							</TR>
					<%
					Vector<String[]> cin = new Vector<String[]>();
					cin = pProcess.getCinemas(per[0]);
					if(cin!=null){
						for(int j = 0 ; j< cin.size(); j++){
							String[] cinemas = new String[2];
							cinemas = cin.get(j);
							Vector<String[]> cinDetail = pProcess.getCinemaDetail(cinemas[0]);
							if(cinDetail!=null){
								for(int k = 0; k< cinDetail.size();k++ ){
									String[] cins = new String[5];
									cins = cinDetail.get(k);
								%>
								<TR>
									<TD><a href="saleDetail.jsp?num=<%=cins[0] %>&per=<%=per[0] %>"><%=cins[1] %></a></TD>
									<TD><%=cins[3] %></TD>
									<TD><%=cins[2] %></TD>
									<TD><%=cins[4] %></TD>
									
								</TR>
								<%
								}
							}
						}
					}
					%></TABLE><%
				}
			}		
		}
	%>
</body>
</html>